package com.sl.au.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.stereotype.Service;
import org.springframework.transaction.UnexpectedRollbackException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import com.sl.au.entity.Account;
import com.sl.au.entity.EXDELoginInfo;
import com.sl.au.entity.Grading;
import com.sl.au.entity.Role;
import com.sl.au.entity.Template;
import com.sl.au.entity.User;
import com.sl.au.repository.AccountRepository;
import com.sl.au.repository.EXDELoginInfoRepository;
import com.sl.au.repository.TemplateDetailsRepository;
import com.sl.au.repository.TemplateRepository;
import com.sl.au.repository.UserRepository;
import com.sl.au.service.AccountService;
import com.sl.au.service.ModuleService;
import com.sl.au.service.TemplateDetailsService;
import com.sl.au.service.TemplateService;

@Service("templateDetailsService")
@Transactional
public class TemplateDetailsServiceImpl extends BaseServiceImpl implements TemplateDetailsService {

	@Autowired
	TemplateDetailsRepository templateDetailsRepository;
	
	@Override
	public TemplateDetailsRepository getRepository() {
		return this.templateDetailsRepository;
	}

	@Override
	public void deleteTemplateDetails(Template template, Grading grading) {
		templateDetailsRepository.deleteByTemplateAndGrading(template, grading);
	}


}
